import { IsString, IsNotEmpty, IsOptional, IsBoolean, IsNumber, IsDateString } from 'class-validator';

export class CreateTodoDto {
  @IsNotEmpty()
  @IsString()
  todocontent: string;

  @IsNotEmpty()
  @IsNumber()
  author: number;

  @IsOptional()
  @IsBoolean()
  finished?: boolean;

  @IsOptional()
  @IsDateString()
  finishtime?: Date;

  @IsNotEmpty()
  @IsString()
  type: string;

  @IsNotEmpty()
  @IsString()
  todoid: string;

  @IsNotEmpty()
  @IsString()
  todotitle: string;

  @IsOptional()
  @IsString()
  picture?: string;

  @IsOptional()
  @IsBoolean()
  remind?: boolean;

  @IsNotEmpty()
  @IsNumber()
  department: number;

  @IsOptional()
  @IsBoolean()
  accountrecord?: boolean;

  @IsOptional()
  @IsString()
  accountrecordinfo?: string;

  @IsOptional()
  @IsBoolean()
  deleted?: boolean;

  @IsOptional()
  @IsBoolean()
  postponed?: boolean;

  @IsOptional()
  @IsBoolean()
  account_completed?: boolean;
} 